<?php
use Think\Route;
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
Route::domain('api', 'api');

//用户登录接口
Route::post('user/login', 'user/login');

//注册接口
Route::post('user/register', 'user/register');

//获取验证码接口
Route::post('code', 'code/get_code');

//绑定邮箱或者手机号
Route::post('user/bindInfo', 'user/bindUserInfo');

//上传用户头像
Route::post('user/icon', 'user/upload_head_img');

//修改用户昵称
Route::post('user/nickname', 'user/chang_nickname');

//修改用户密码
Route::post('user/changPwd', 'user/chang_password');

//找回密码
Route::post('user/find_pwd', 'user/find_password');

/*
 *文章模块
 */
//新增文章
Route::post('article', 'article/add_article');

//查詢文章
Route::get('articles/:time/:token/:article_uid/[:num]/[:page]', 'article/article_list');

//查看文章详情
Route::get('article/:time/:token/:id', 'article/article_detail');

//修改文章
Route::put('article', 'article/edit_article');

//删除文章
Route::delete('article', 'article/delect_article');